//
//  main.c
//  指针与字符串1
//
//  Created by szcq on 2021/5/7.
//

#include <stdio.h>
int myStrlen(char *str);
int main(int argc, const char * argv[]) {
    // insert code here...
    char * name = "jackie";
    int length = myStrlen(name);
    
    return 0;
}

int myStrlen(char *str) {
    int count = 0;
    while (*str != '\0') {
        printf("str_p == %p \n",str);
        /**
         str_p == 0x100003f9e
         str_p == 0x100003f9f
         str_p == 0x100003fa0
         str_p == 0x100003fa1
         str_p == 0x100003fa2
         str_p == 0x100003fa3 
         */
        str = str + 1;
        count ++ ;
    }
    /**
      \0 ascii 0 // 0代表假 1真
        while (*str++)count++;
     */
    return count;
}
